import request from '@/utils/request'

//新增接口
export const addWcGoods = (data = {}, params = {}) => {
  return request({
    url: 'wcGoods',
    method: 'POST',
    data,
    params
  })
}
//修改接口
export const updataWcGoods = (data = {}, params = {}) => {
  return request({
    url: 'wcGoods',
    method: 'PUT',
    data,
    params
  })
}
//导出接口
export const exportWcGoods = (data = {}, params = {}) => {
  return request({
    url: 'wcGoods/export',
    method: 'POST',
    responseType: "blob",
    data,
    params
  })
}
//查询列表接口
export const listWcGoods = (data = {}, params = {}) => {
  return request({
    url: 'wcGoods/list',
    method: 'GET',
    data,
    params
  })
}
//删除接口
export function deleteWcGoods(ids) {
  return request({
    url: `wcGoods/${ids}`,
    method: 'DELETE'
  })
}
//单查接口
export function findWcGoods(id) {
  return request({
    url: `wcGoods/${id}`,
    method: 'GET'
  })
}

//上下架接口
export function findWcGoodsGroundingGood(data = {}) {
  return request({
    url: `/wcGoods/groundingGood`,
    method: 'POST',
    data
  })
}
